package com.zxb.controller;

import com.zxb.annotation.AutoWired;
import com.zxb.annotation.Controller;
import com.zxb.annotation.RequestMapping;
import com.zxb.annotation.RequestParam;
import com.zxb.service.ITest;
import com.zxb.service.IUserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;


/**
 * @author Administrator
 */
@Controller
@RequestMapping("/zxb")
public class TestController {

    @AutoWired
    private IUserService userService;

    @AutoWired
    private ITest testTest;

    @RequestMapping("/test")
    public String test(HttpServletRequest request, HttpServletResponse response,
                       @RequestParam("name") String name) throws IOException {
        PrintWriter writer = response.getWriter();
        writer.write("name=" + name);
        writer.close();
        return "name=" + name;
    }
}
